package org.starapp.generator;

import java.util.HashMap;
import java.util.Map;

public class DBFactory {

	public static DBConnection getDBConnection() {
		return new DBConnection(ResourceUtils.getDriver(), ResourceUtils
				.getJdbcUrl(), ResourceUtils.getUser(), ResourceUtils
				.getPassword());
	}
	
	private static Map<String, String> map;
	static{
		map = new HashMap<String, String>();
		map.put("BIGINT", "long");
		map.put("VARCHAR", "String");
	}
	public static String getType(String fieldType){
		return map.get(fieldType)==null?"String":map.get(fieldType);
	}
}
